package com.iyundao.io.Service.Impl;

import com.iyundao.io.Service.SysRoleService;
import com.iyundao.io.mapper.SysRoleMapper;
import com.iyundao.io.mapper.SysRoleSqlMapper;
import com.iyundao.io.model.SysRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by black on 2019/3/25.
 */

@Service
@Transactional
public class SysRoleServiceImpl implements SysRoleService {

    @Autowired
    private SysRoleSqlMapper sysRoleSqlMapper;

    @Override
    public SysRole findByUserId(String userId) {
        return sysRoleSqlMapper.selectByUserId(userId);
    }

    @Override
    public List<SysRole> getRoleByFlag(String flag){
        return sysRoleSqlMapper.selectRoleByFlag(flag);
    }
}
